﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>管理平台登入</title>
    <link href="/Content/Skin/Admin/default/login/style/main_login.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/Content/Widget/jquery-easyui/themes/gray/easyui.css" />
    <link href="/Content/Widget/jquery-easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="/Content/Admin/common-admin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Content/Widget/jquery-easyui/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/Content/Widget/jquery-easyui/jquery.easyui.min.js"></script>
    <script src="/Content/Widget/jquery-easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="/Content/Scripts/common-admin.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btn-login").click(function () {
                if ($('#login-form').form('validate')) {
                    $.ajax({
                        url: '<%=Url.Action("Login") %>',
                        type: 'Post',
                        data: $('#login-form').serialize(),
                        dataType: 'json',
                        timeout: 1000,
                        success: function (data) {
                            if (data.state)
                                location.href = '<%=Url.Action("Index","Main") %>';
                            else {
                                msgShow("登入提示", data.message, data.state ? "info" : "error", function () {
                                    if (data.state)
                                        location.href = '<%=Url.Action("Index","Main") %>';
                                    $('#imgCode').attr('src', $('#imgCode').attr('src') + '?');
                                });
                            }


                        }
                    });
                }
            });
            $('input').keydown(function (e) {
                //alert(event.keyCode); //去掉前面的注释按键盘上的键可以得到对应键的ascii码，例如回车的ascii码是13
                if (e.ctrlKey && e.which == 13 || e.which == 13) {
                    if ($('#login-form').form('validate')) {
                        $.ajax({
                            url: '<%=Url.Action("Login") %>',
                            type: 'Post',
                            data: $('#login-form').serialize(),
                            dataType: 'json',
                            timeout: 1000,
                            success: function (data) {
                                if (data.state)
                                    location.href = '<%=Url.Action("Index","Main") %>';
                                else {
                                    msgShow("登入提示", data.message, data.state ? "info" : "error", function () {
                                        if (data.state)
                                            location.href = '<%=Url.Action("Index","Main") %>';
                                        $('#imgCode').attr('src', $('#imgCode').attr('src')+'?');
                                    });
                                }


                            }
                        });
                    }
                }
            });
        });
    </script>
</head>
<body>
    <!--由专业的温州网络公司—温州市联科科技有限公司设计制作，如有任何意见或建设请联系我们，网站技术支持网址：http://www.lianke.cn-->
    <div id="main">
        <div id="wrapper">
            <form action="<%=Url.Action("Login") %>" method="POST" id="login-form">
            <div id="sys_name">
                &nbsp;</div>
            <ul id="cont">
                <li>
                    <label class="lb" for="uname">
                        用户名</label>
                    <input name="username" id="uname" type="text" class="ip easyui-validatebox" value=""
                        maxlength="18" required="true" />
                </li>
                <li>
                    <label class="lb" for="pwd">
                        密码</label>
                    <input name="password" id="pwd" type="password" class="ip easyui-validatebox" value=""
                        maxlength="10" required="true" />
                </li>
                <li style="height: 35px; line-height: 35px; vertical-align: middle; vert-align: middle;
                    position: relative">
                    <label class="lb" for="_mvcCaptchaText">
                        验证码</label>
                    <input name="code" id="code" style="width: 40px; vertical-align: middle; display: inline"
                        type="text" class="ip easyui-validatebox" value="" maxlength="4" required="true" />
                    <em id="captchaImage" style="overflow: hidden; line-height: 30px; height: 30px; position: absolute;
                        left: 135px; top: 4px;">
                        <img src="<%=Url.Action("Code") %>" id="imgCode" width="60px" height="25px" onclick="this.src=this.src+'?'"
                            style="cursor: pointer;" alt="看不清？点击更换" />
                    </em></li>
                <li><span>
                    <img id="btn-login" src="/Content/Skin/Admin/default/login/images/ente.png" style="cursor: pointer"
                        title="登录系统" />
                </span></li>
            </ul>
            <p id="copy">
            </p>
            </form>
        </div>
    </div>
</body>
</html>
